package com.erp.entity.sale;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

//销货单类
public class Sale {
    private Integer id;

    private String saleNumber;//销货单据编号
    private Integer invoiceType;//订单类型

    private String linkQuoteNumber;//关联报价单单据编号

    private BigDecimal saleAmount;//销货订单销售金额

    private Integer customerId;//客户ID

    private Integer employeeId;//销售人员ID
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")

    private Date receiptDate;//单据日期

    private String customerAddress;//客户地址

    private BigDecimal discountRate;//销货订单优惠率

    private BigDecimal discountAmount;//销货订单优惠金额

    private BigDecimal salePriceDis;//销货订单优惠后金额

    private BigDecimal customerCost;//客户承担费用

    private BigDecimal thisCollection;//本次收款金额

    private Integer balanceAccountId;//结算账户id

    private BigDecimal thisDebt;//本次欠款金额

    private BigDecimal allDebt;//总欠款金额

    private BigDecimal sellingCost;//销售费用
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")

    private Date receiveDate;//收款到账日期

    private Boolean hasQrCode;//是否有收款二维码

    private Integer isExamined;//是否审核

    private Boolean isNeedInvoice;//是否需要发票

    private Integer payTy;//支付通道(开启收款二维码时展示)

    private Integer deliveryTyId;//物流公司ID(交货方式为快递物流时展示)

    private Integer logisticsCompanyId;//交货方式ID

    private Integer sendAddressId;//发货地址ID(交货方式为快递物流时展示)

    private Integer receivePayTypeId;//收款条件ID

    private Integer preReceiveId;//预收款单ID

    private Integer linkRouteId;//关联线路ID

    private Float weight;//

    private Integer unshippedNum;//销货单总商品未出库数量

    private Integer companyId;//
    private Integer totalGoodsNum;//销货单商品总数量
    private Integer saleStatus;//销货单商品出库状态
    private String remarks;//销货单备注
    private String linkLogisticsNumber;//关联物流单据编号
    private Integer receivePayStatus;//收款状态 0未收款 1 部分收款 2 已全部收款
    private Integer rejectedStatus;//退货状态 0 未退货 1 部分退货 2 全部退货
    private Integer isDelete;//逻辑删除 0未删除 1已删除
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")

    private Date createDate;//制单时间
    private BigDecimal totalTaxAmount;//销货订单总税额

    //-----------------冗余字段-----------------------
    private List<SaleDetail> saleDetailList;
    private String customerName;//客户名称
    private String customerTypeName;//客户类别名称
    private String employeeName;//销售人员名称
    private String makerName;//制单人名称
    private String examinerName;//审核人名称
    private String deliveryTyName;//交货方式名称
    private String logisticsCompanyName;//物流公司名称
    private String linkRouteName;//关联线路名称
    private String balanceAccountName;//结算账户名称


    public void setBasicInfo(Integer isDelete,Date createDate,
                             Integer rejectedStatus,Integer saleStatus,Integer receivePayStatus,
                             BigDecimal saleAmount,BigDecimal totalTaxAmount,Integer totalGoodsNum){
        setIsDelete(isDelete);
        setCreateDate(createDate);
        setRejectedStatus(rejectedStatus);
        setSaleStatus(saleStatus);
        setReceivePayStatus(receivePayStatus);
        setSaleAmount(saleAmount);
        setTotalTaxAmount(totalTaxAmount);
        setTotalGoodsNum(totalGoodsNum);
    }
    public String getCustomerAddress() {
        return customerAddress;
    }

    public void setCustomerAddress(String customerAddress) {
        this.customerAddress = customerAddress;
    }

    public Integer getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }

    public Integer getSaleStatus() {
        return saleStatus;
    }

    public void setSaleStatus(Integer saleStatus) {
        this.saleStatus = saleStatus;
    }

    public BigDecimal getTotalTaxAmount() {
        return totalTaxAmount;
    }

    public void setTotalTaxAmount(BigDecimal totalTaxAmount) {
        this.totalTaxAmount = totalTaxAmount;
    }

    public List<SaleDetail> getSaleDetailList() {
        return saleDetailList;
    }

    public void setSaleDetailList(List<SaleDetail> saleDetailList) {
        this.saleDetailList = saleDetailList;
    }

    public String getLinkRouteName() {
        return linkRouteName;
    }

    public void setLinkRouteName(String linkRouteName) {
        this.linkRouteName = linkRouteName;
    }

    public String getBalanceAccountName() {
        return balanceAccountName;
    }

    public void setBalanceAccountName(String balanceAccountName) {
        this.balanceAccountName = balanceAccountName;
    }

    public String getMakerName() {
        return makerName;
    }

    public void setMakerName(String makerName) {
        this.makerName = makerName;
    }

    public BigDecimal getSaleAmount() {
        return saleAmount;
    }

    public void setSaleAmount(BigDecimal saleAmount) {
        this.saleAmount = saleAmount;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getRejectedStatus() {
        return rejectedStatus;
    }

    public void setRejectedStatus(Integer rejectedStatus) {
        this.rejectedStatus = rejectedStatus;
    }

    public Integer getReceivePayStatus() {
        return receivePayStatus;
    }

    public void setReceivePayStatus(Integer receivePayStatus) {
        this.receivePayStatus = receivePayStatus;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerTypeName() {
        return customerTypeName;
    }

    public void setCustomerTypeName(String customerTypeName) {
        this.customerTypeName = customerTypeName;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public String getLinkLogisticsNumber() {
        return linkLogisticsNumber;
    }

    public void setLinkLogisticsNumber(String linkLogisticsNumber) {
        this.linkLogisticsNumber = linkLogisticsNumber;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSaleNumber() {
        return saleNumber;
    }

    public void setSaleNumber(String saleNumber) {
        this.saleNumber = saleNumber == null ? null : saleNumber.trim();
    }

    public String getLinkQuoteNumber() {
        return linkQuoteNumber;
    }

    public void setLinkQuoteNumber(String linkQuoteNumber) {
        this.linkQuoteNumber = linkQuoteNumber == null ? null : linkQuoteNumber.trim();
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Integer getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Integer employeeId) {
        this.employeeId = employeeId;
    }

    public Date getReceiptDate() {
        return receiptDate;
    }

    public void setReceiptDate(Date receiptDate) {
        this.receiptDate = receiptDate;
    }



    public Boolean getNeedInvoice() {
        return isNeedInvoice;
    }

    public void setNeedInvoice(Boolean needInvoice) {
        isNeedInvoice = needInvoice;
    }

    public BigDecimal getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(BigDecimal discountRate) {
        this.discountRate = discountRate;
    }



    public BigDecimal getSalePriceDis() {
        return salePriceDis;
    }

    public void setSalePriceDis(BigDecimal salePriceDis) {
        this.salePriceDis = salePriceDis;
    }

    public BigDecimal getCustomerCost() {
        return customerCost;
    }

    public void setCustomerCost(BigDecimal customerCost) {
        this.customerCost = customerCost;
    }

    public BigDecimal getThisCollection() {
        return thisCollection;
    }

    public void setThisCollection(BigDecimal thisCollection) {
        this.thisCollection = thisCollection;
    }

    public Integer getBalanceAccountId() {
        return balanceAccountId;
    }

    public void setBalanceAccountId(Integer balanceAccountId) {
        this.balanceAccountId = balanceAccountId;
    }

    public BigDecimal getThisDebt() {
        return thisDebt;
    }

    public void setThisDebt(BigDecimal thisDebt) {
        this.thisDebt = thisDebt;
    }

    public BigDecimal getAllDebt() {
        return allDebt;
    }

    public void setAllDebt(BigDecimal allDebt) {
        this.allDebt = allDebt;
    }

    public BigDecimal getSellingCost() {
        return sellingCost;
    }

    public void setSellingCost(BigDecimal sellingCost) {
        this.sellingCost = sellingCost;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public Boolean getHasQrCode() {
        return hasQrCode;
    }

    public void setHasQrCode(Boolean hasQrCode) {
        this.hasQrCode = hasQrCode;
    }

    public Integer getIsExamined() {
        return isExamined;
    }

    public void setIsExamined(Integer isExamined) {
        this.isExamined = isExamined;
    }

    public Boolean getIsNeedInvoice() {
        return isNeedInvoice;
    }

    public void setIsNeedInvoice(Boolean isNeedInvoice) {
        this.isNeedInvoice = isNeedInvoice;
    }

    public Integer getPayTy() {
        return payTy;
    }

    public void setPayTy(Integer payTy) {
        this.payTy = payTy;
    }

    public Integer getDeliveryTyId() {
        return deliveryTyId;
    }

    public void setDeliveryTyId(Integer deliveryTyId) {
        this.deliveryTyId = deliveryTyId;
    }

    public Integer getLogisticsCompanyId() {
        return logisticsCompanyId;
    }

    public void setLogisticsCompanyId(Integer logisticsCompanyId) {
        this.logisticsCompanyId = logisticsCompanyId;
    }

    public Integer getSendAddressId() {
        return sendAddressId;
    }

    public void setSendAddressId(Integer sendAddressId) {
        this.sendAddressId = sendAddressId;
    }

    public Integer getReceivePayTypeId() {
        return receivePayTypeId;
    }

    public void setReceivePayTypeId(Integer receivePayTypeId) {
        this.receivePayTypeId = receivePayTypeId;
    }

    public Integer getPreReceiveId() {
        return preReceiveId;
    }

    public void setPreReceiveId(Integer preReceiveId) {
        this.preReceiveId = preReceiveId;
    }

    public Integer getLinkRouteId() {
        return linkRouteId;
    }

    public void setLinkRouteId(Integer linkRouteId) {
        this.linkRouteId = linkRouteId;
    }

    public String getExaminerName() {
        return examinerName;
    }

    public void setExaminerName(String examinerName) {
        this.examinerName = examinerName;
    }

    public String getDeliveryTyName() {
        return deliveryTyName;
    }

    public void setDeliveryTyName(String deliveryTyName) {
        this.deliveryTyName = deliveryTyName;
    }

    public String getLogisticsCompanyName() {
        return logisticsCompanyName;
    }

    public void setLogisticsCompanyName(String logisticsCompanyName) {
        this.logisticsCompanyName = logisticsCompanyName;
    }

    public Float getWeight() {
        return weight;
    }

    public void setWeight(Float weight) {
        this.weight = weight;
    }


    public Integer getUnshippedNum() {
        return unshippedNum;
    }

    public void setUnshippedNum(Integer unshippedNum) {
        this.unshippedNum = unshippedNum;
    }

    public Integer getTotalGoodsNum() {
        return totalGoodsNum;
    }

    public void setTotalGoodsNum(Integer totalGoodsNum) {
        this.totalGoodsNum = totalGoodsNum;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks == null ? null : remarks.trim();
    }
}